func (d *domainClient) StartTrackingHeapObjects(ctx context.Context, args *StartTrackingHeapObjectsArgs) (err error) {
	if args != nil {
		err = rpcc.Invoke(ctx, "HeapProfiler.startTrackingHeapObjects", args, nil, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "HeapProfiler.startTrackingHeapObjects", nil, nil, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "HeapProfiler", Op: "StartTrackingHeapObjects", Err: err}
	}
	return
}
StartTrackingHeapObjects invokes the HeapProfiler method.
package heapprofiler
import (
	"context"
	"github.com/mafredri/cdp/protocol/internal"
	"github.com/mafredri/cdp/rpcc"
)
type domainClient struct{ conn *rpcc.Conn }
func NewClient(conn *rpcc.Conn) *domainClient {
	return &domainClient{conn: conn}
}
func (d *domainClient) AddInspectedHeapObject(ctx context.Context, args *AddInspectedHeapObjectArgs) (err error) {
	if args != nil {
		err = rpcc.Invoke(ctx, "HeapProfiler.addInspectedHeapObject", args, nil, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "HeapProfiler.addInspectedHeapObject", nil, nil, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "HeapProfiler", Op: "AddInspectedHeapObject", Err: err}
	}
	return
}
func (d *domainClient) CollectGarbage(ctx context.Context) (err error) {
	err = rpcc.Invoke(ctx, "HeapProfiler.collectGarbage", nil, nil, d.conn)
	if err != nil {
		err = &internal.OpError{Domain: "HeapProfiler", Op: "CollectGarbage", Err: err}
	}
	return
}
func (d *domainClient) Disable(ctx context.Context) (err error) {
	err = rpcc.Invoke(ctx, "HeapProfiler.disable", nil, nil, d.conn)
	if err != nil {
		err = &internal.OpError{Domain: "HeapProfiler", Op: "Disable", Err: err}
	}
	return
}
func (d *domainClient) Enable(ctx context.Context) (err error) {
	err = rpcc.Invoke(ctx, "HeapProfiler.enable", nil, nil, d.conn)
	if err != nil {
		err = &internal.OpError{Domain: "HeapProfiler", Op: "Enable", Err: err}
	}
	return
}
func (d *domainClient) GetHeapObjectID(ctx context.Context, args *GetHeapObjectIDArgs) (reply *GetHeapObjectIDReply, err error) {
	reply = new(GetHeapObjectIDReply)
	if args != nil {
		err = rpcc.Invoke(ctx, "HeapProfiler.getHeapObjectId", args, reply, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "HeapProfiler.getHeapObjectId", nil, reply, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "HeapProfiler", Op: "GetHeapObjectID", Err: err}
	}
	return
}
func (d *domainClient) GetObjectByHeapObjectID(ctx context.Context, args *GetObjectByHeapObjectIDArgs) (reply *GetObjectByHeapObjectIDReply, err error) {
	reply = new(GetObjectByHeapObjectIDReply)
	if args != nil {
		err = rpcc.Invoke(ctx, "HeapProfiler.getObjectByHeapObjectId", args, reply, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "HeapProfiler.getObjectByHeapObjectId", nil, reply, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "HeapProfiler", Op: "GetObjectByHeapObjectID", Err: err}
	}
	return
}
func (d *domainClient) GetSamplingProfile(ctx context.Context) (reply *GetSamplingProfileReply, err error) {
	reply = new(GetSamplingProfileReply)
	err = rpcc.Invoke(ctx, "HeapProfiler.getSamplingProfile", nil, reply, d.conn)
	if err != nil {
		err = &internal.OpError{Domain: "HeapProfiler", Op: "GetSamplingProfile", Err: err}
	}
	return
}
func (d *domainClient) StartSampling(ctx context.Context, args *StartSamplingArgs) (err error) {
	if args != nil {
		err = rpcc.Invoke(ctx, "HeapProfiler.startSampling", args, nil, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "HeapProfiler.startSampling", nil, nil, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "HeapProfiler", Op: "StartSampling", Err: err}
	}
	return
}